package com.zkthink.ceres.promotion.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zkthink.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import javax.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * <p>
 * 实体类 分销员
 * </p>
 *
 * @author kellen
 * @since 2020-08-22
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ceres_sales_customer")
@ApiModel(value = "SalesCustomer", description = "分销员")
@AllArgsConstructor
public class SalesCustomer extends Entity<Long> {

  private static final long serialVersionUID = 1L;

  /**
   * 分销员id
   */
  @ApiModelProperty(value = "分销员id")
  @NotNull(message = "分销员id不能为空")
  @TableField("sid")
  @Excel(name = "分销员id")
  private Long sid;

  /**
   * 用户id
   */
  @ApiModelProperty(value = "用户id")
  @NotNull(message = "用户id不能为空")
  @TableField("mid")
  @Excel(name = "用户id")
  private Long mid;

  /**
   * 是否有效 1是 2否
   */
  @ApiModelProperty(value = "是否有效 1是 2否")
  @NotNull(message = "是否有效 1是 2否不能为空")
  @TableField("is_valid")
  @Excel(name = "是否有效 1是 2否")
  private Integer isValid;

  /**
   * 逻辑删除 1-删除 0-未删除
   */
  @ApiModelProperty(value = "逻辑删除 1-删除 0-未删除")
  @NotNull(message = "逻辑删除 1-删除 0-未删除不能为空")
  @TableField("is_delete")
  @Excel(name = "逻辑删除 1-删除 0-未删除")
  private Integer isDelete;


  private String tenantCode;


  @Builder
  public SalesCustomer(Long id, LocalDateTime updateTime, Long updateUser, LocalDateTime createTime,
      Long createUser,
      Long sid, Long mid, Integer isValid, Integer isDelete, String tenantCode) {
    this.id = id;
    this.updateTime = updateTime;
    this.updateUser = updateUser;
    this.createTime = createTime;
    this.createUser = createUser;
    this.sid = sid;
    this.mid = mid;
    this.isValid = isValid;
    this.isDelete = isDelete;
    this.tenantCode = tenantCode;
  }

}
